
   <#include "head.ftl">
<div class="container-wrap" style='width:98%;background:#fff'>
<div class="panel-heading" style="background:#fff; border:none;text-align:center;">
 <img src='${Domain.base}/public/images/new_png.png' class='new_img' />
 </div>
		<table class="table">
      <tbody>
      <#list results as item>
        <tr style='padding:4px 6px;width:96%'>
          <td style='padding-left:8px;'>
          <a href="${Domain.base}/result/${item.id}" style="display:inline-block;color:#272727;width:78%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;">
          ${item.title}</a>
          <span style='float:right;margin-right:20px;'>${item.cdate?string("MM-dd")}</span>
          </td>
        </tr>
       </#list>
      </tbody>
    </table>
<p class='more_btn' ><a href="javascript:history.go(-1)" class='more_text' style='margin-bottom:16px;'>返回</a></p>
</div>
   <#include "foot.ftl">
<script>
    $('#submit').click(function () {
        var username = $("input[name=username]").val();
        var password = $("input[name=password]").val();
        if(!username || !password){
            alert('所有字段不能为空');
            return false;
        }
        $.ajax({
            type:'POST',
            url:'${Domain.base}/api/oauth/login',
            dataType:'json',
            data:{username:username,password:password},
            success:function (response) {
                if(response.status){
                    window.location.href = '${Domain.base}/admin';
                }else {
                    alert('登录失败,请仔细检查账号和密码');
                    return false;
                }
            },
            error:function (response) {
                alert('发生未知错误，请稍后再尝试');
            }
        });
    });
</script>